n, m = map(int, input().split())
arr = list(map(int, input().split()))
dif = [arr[0]]
for i in range(1, len(arr)):
    dif.append(arr[i] - arr[i - 1])
dif.append(0)
for _ in range(m):
    l, r, d = map(int, input().split())
    dif[l - 1] += d
    dif[r] -= d
arr2 = [dif[0]]
sum = dif[0]
for i in range(1, len(arr)):
    sum += dif[i]
    arr2.append(sum)
for e in arr2:
    print(e, end=" ")
